//
//  MineCell.m
//  Fireball
//
//  Created by 俞渊华 on 2017/12/8.
//  Copyright © 2017年 俞渊华. All rights reserved.
//

#import "MineCell.h"

@implementation MineCell

+ (instancetype)cellWithTableView:(UITableView *)tableView{
    static NSString * identifier = @"MineCell";
    MineCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier];
    if (!cell) {
        cell = [[MineCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
    }
    return cell;
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
        self.backgroundColor = [UIColor whiteColor];

        self.textLabel.textColor = [UIColor xm_middleColor];
        self.textLabel.font = [UIFont xm_font:13.0];
    }
    return self;
}

-(void)setDict:(NSDictionary *)dict{
    _dict = dict;
    self.imageView.image = [UIImage imageNamed:_dict[@"image"]];
    self.textLabel.text = _dict[@"title"];
}

-(void)layoutSubviews{
    [super layoutSubviews];
}

@end
